package model

type Role struct {
	BaseModal
	Name       string `gorm:"type:varchar(255);column:name" json:"name"`
	Permission int64  `gorm:"type:bigint;column:permission" json:"permission"`
}

func (Role) TableName() string {
	return "sys_role"
}

type UserRoles struct {
	BaseModal
	UserId     int64 `gorm:"type:bigint;column:user_id" json:"user_id"`
	RoleId     int64 `gorm:"type:bigint;column:role_id" json:"role_id"`
	Company    int64 `gorm:"type:bigint;column:company" json:"company"`
	Department int64 `gorm:"type:bigint;column:department" json:"department"`
}

func (UserRoles) TableName() string {
	return "sys_user_roles"
}
